package org.jradweb.core.taglib;

import java.io.IOException;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.BodyContent;
import javax.servlet.jsp.tagext.BodyTagSupport;
import javax.servlet.jsp.tagext.Tag;

public class MyTag extends BaseTag {

	@Override
	public int doEndTag() throws JspException {
		BodyContent bc=this.getBodyContent();
		
		try {
			JspWriter out=this.pageContext.getOut();
			out.println(bc.getString());
			out.println("<p>this is myTag</p>");
			return EVAL_PAGE;
		} catch (IOException e) {
			throw new JspException(e);
		}
	}

	@Override
	public void doInitBody() throws JspException {
		BodyContent bc=this.getBodyContent();
		super.doInitBody();
	}

	@Override
	public int doStartTag() throws JspException {
		return super.doStartTag();
	}

	/**
	 * 
	 */
	private static final long serialVersionUID = -5314644454319515579L;

	@Override
	public void setBodyContent(BodyContent b) {
		// TODO Auto-generated method stub
		super.setBodyContent(b);
	}

}
